
#ifndef _MY_WIN_FRAME_DEMO_WINDOW_H_
#define _MY_WIN_FRAME_DEMO_WINDOW_H_


#ifndef _MY_WIN_FRAME_H_
#include "../myui/MYUI/myui.h"
using namespace MYUI;
#endif

#define UWM_TRAYICON  (UWM_USER + 2)
#define UWM_LOGIN_NOTIFY    (UWM_USER + 101)
#define UWM_LOGOUT_NOTIFY    (UWM_USER + 102)

#define LOGIN_WPARAM_CONNECT_FAILED   0x01

class CFrameWindow : public CWindowUI 
{
public:
	CFrameWindow();
	~CFrameWindow();

	void OnNotify(MUINOTIFY &notify);
	LRESULT OnEvent(MUIEVENT &event);

public:

protected:
	virtual LRESULT CALLBACK WndProc(UINT message, WPARAM wParam, LPARAM lParam);

	LRESULT OnCreate(WPARAM wParam, LPARAM lParam);
	LRESULT OnReady(WPARAM wParam, LPARAM lParam);

	BOOL ShowError(BOOL bShow, LPCTSTR strError);
	void EnableLogin(BOOL bEnable);

	BOOL OnClick_Test();
	BOOL OnClick_Login();
	BOOL OnClick_Logout();
	BOOL OnClick_Looked();
	BOOL OnClick_Close();

private:
	CMuiString m_strAccess;
	CMuiString m_strPassword;
	NOTIFYICONDATA m_NofityIcon;
	CMenuUI* m_pMenUI;
};



#endif